import random
# -*- coding:utf-8 -*-
character='abcdefghijklmnopqrstuvwxyz'



raw = ['水泥','涂料','钢筋','玻璃','大理石','木料','灯饰','家电','布料']

def get_id(n):
    # 定义员工id以100开始
    # 定义客户id以888开始
    for i in range(0,n):
        tel='888'
        for j in range(0,7):
            tel+=str(random.randint(0,9))
        # a<= x <=b
        print(tel)
def get_tel_number(n):
    for i in range(0,n):
        tel='1'
        for j in range(0,10):
            tel+=str(random.randint(0,9))
        # a<= x <=b
        print(tel)
def get_department(n):
    for i in range(0,n):
        tel=random.choice('SMAL')
        tel+='0'
        tel+=str(random.randint(0,9))
        # a<= x <=b
        print(tel)
def get_birth(n):
    for i in range(0,n):
        tel=''
        tel+=str(2000-random.randint(0,20))
        tel+='-'
        tel+=str(random.randint(0,12))
        tel+='-'
        tel+=str(random.randint(0,30))
        print(tel)
def get_name(n):
    xing='赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜梁黄'
    ming='豫章故郡洪都新府星分翼轸地接衡庐襟三江而带五湖忠义建国立业'
    for i in range(0,n):
        X=random.choice(xing)
        M="".join(random.choice(ming) for i in range(2))
        print(X+M)
def get_address(n):
    sheng=['河北省','湖南省','四川省','河南省','湖北省','广东省','广西省']
    shi=['辛集市','藁城市','江南市','江北市','山南市','山北市','高邑县']
    lu=['建国路','建党路','中山路','建设街','解放大道','兴国路','民族街']
    for i in range(0,n):
        add=''
        add+=sheng[random.randint(0,len(sheng)-1)]
        add+=shi[random.randint(0,len(shi)-1)]
        add+=lu[random.randint(0,len(lu)-1)]
        add+=str(random.randint(0,99))
        add+='号'
        print(add)
def get_Int_number(n):
    for i in range(0,n):
        print(random.randint(0,1000))


def get_init_user(n):
    S = set()

    xing = '赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜梁黄'
    ming = '豫章故郡洪都新府星分翼轸地接衡庐襟三江而带五湖忠义建国立业'
    gender = '男女'
    for i in range(0,n):
        id='201'
        for j in range(0,7):
            id+=str(random.randint(0,9))

        X = random.choice(xing)
        M = "".join(random.choice(ming) for i in range(2))
        sgender = random.choice(gender)
        passwd = id[4:]

        email = id+"@hfut.com"
        tel = '1'
        for j in range(0,10):
            tel+=str(random.randint(0,9))

        types = ['Sman','Wkeeper','STleader']
        type =random.choice(types)

        fen = '"'
        ans = id+","+fen+X +M+fen+","+ passwd +"," + fen+sgender +fen+ ","+fen+email+fen+","+tel +","+fen+type+fen+",1" + ",2021-06-30 09:10:20"+ ",2021-06-30 09:10:20"
        S.add(ans+ '\n')
        if len(S) == n:
            break
    L = list(S)
    with open('user.txt', 'w',encoding='UTF-8') as f:
        f.writelines(L)


def get_init_salesman(n):
    S = set()

    xing = '赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜梁黄'
    ming = '豫章故郡洪都新府星分翼轸地接衡庐襟三江而带五湖忠义建国立业'
    gender = '男女'
    for i in range(0,n):
        id='201'
        for j in range(0,7):
            id+=str(random.randint(0,9))

        X = random.choice(xing)
        M = "".join(random.choice(ming) for i in range(2))
        sgender = random.choice(gender)
        age = str(random.randint(2,4)) + str(random.randint(0,9))


        email = id+"@hfut.com"
        tel = '1'
        for j in range(0,10):
            tel+=str(random.randint(0,9))

        introduction = random.choice(raw)
        grade = ""
        for j in range(0, 2):
            grade += str(random.randint(5, 9))

        grade += '.'

        for j in range(0, 2):
            grade += str(random.randint(0, 9))

        fen = '"'
        ans = fen+age+fen+','
        S.add(ans+'\n')
        if len(S) == n:
            break
    L = list(S)
    with open('salesman1.txt', 'w',encoding='UTF-8') as f:
        f.writelines(L)


def get_init_house(n):
    S = set()
    sheng = ['河北省', '湖南省', '四川省', '河南省', '湖北省', '广东省', '广西省']
    shi = ['辛集市', '藁城市', '江南市', '江北市', '山南市', '山北市', '高邑县']
    lu = ['建国路', '建党路', '中山路', '建设街', '解放大道', '兴国路', '民族街']

    for i in range(0,n):
        id='100'
        id+=str(i+1)
        add = ''
        add += sheng[random.randint(0, len(sheng) - 1)]
        add += shi[random.randint(0, len(shi) - 1)]
        add += lu[random.randint(0, len(lu) - 1)]
        add += str(random.randint(0, 99))
        add += '号'
        print(add)




        name = random.choice(raw)
        name += random.choice(raw)


        volu = ""
        for j in range(0, 5):
            volu += str(random.randint(5, 9))

        volu += '.'
        for j in range(0, 2):
            volu += str(random.randint(0, 9))

        fen = '"'
        ans = fen+id+fen+','+fen+name+fen+','+fen+volu+fen+','+fen+add+fen


        S.add(ans+'\n')
        if len(S) == n:
            break
    L = list(S)
    with open('house.txt', 'w',encoding='UTF-8') as f:
        f.writelines(L)

def get_init_raw(n):
    S = set()


    for i in range(0,n):
        tel = '100000000'
        tel += str(i+1)

        name = raw[i]

        intr = name


        fen = '"'
        ans = fen+tel+fen+','+fen+name+fen+','+fen+intr+fen


        S.add(ans+'\n')
        if len(S) == n:
            break
    L = list(S)
    with open('hraw.txt', 'w',encoding='UTF-8') as f:
        f.writelines(L)

def get_init_provider(n):
    S = set()

    sheng = ['河北省', '湖南省', '四川省', '河南省', '湖北省', '广东省', '广西省']
    shi = ['辛集市', '藁城市', '江南市', '江北市', '山南市', '山北市', '高邑县']
    lu = ['建国路', '建党路', '中山路', '建设街', '解放大道', '兴国路', '民族街']
    for i in range(0,n):
        id = '10'
        id += str(i+10)
        shi = sheng[random.randint(0, len(sheng) - 1)]+ shi[random.randint(0, len(shi) - 1)]
        name = shi+raw[random.randint(0, len(raw) - 1)]+"有限公司"

        add = shi
        add += lu[random.randint(0, len(lu) - 1)]
        add += str(random.randint(0, 99))
        add += '号'
        fen = '"'

        grade = ""
        for j in range(0, 2):
            grade += str(random.randint(5, 9))

        grade += '.'

        for j in range(0, 2):
            grade += str(random.randint(0, 9))

        email = id + "@hfut.com"
        tel = '1'
        for j in range(0, 10):
            tel += str(random.randint(0, 9))
        ans = fen+id+fen+','+fen+name+fen+','+fen+add+fen+','+fen+grade+fen+','+fen+email+fen+','+fen+tel+fen


        S.add(ans+'\n')
        if len(S) == n:
            break
    L = list(S)
    with open('provider.txt', 'w',encoding='UTF-8') as f:
        f.writelines(L)

# get_init_user(20)
#get_init_salesman(12)
#get_init_house(7)
#get_init_raw(9)
# get_init_provider(20)
print(type(5))